import { createSlice } from "@reduxjs/toolkit";

export const TickSlice = createSlice({
  name: "counter",
  initialState: {
    ticksons:[
        {
            id:'1',
            name:'培训',
            code:'135468520157541',
            state:false,
            log:'学生'
        },
        {
            id:'2',
            name:'接口',
            code:'157852349875314',
            state:false,
            log:'儿童'
        },
    ]
  },
  reducers: {
    exCity(state) {
      const temp = state.start;
      state.start = state.end;
      state.end = temp;
    },
    editDate(state, { payload }) {
      state[payload.data] = payload.data;
    },
  },
});

// Action creators are generated for each case reducer function
export const { exCity } = TickSlice.actions;

export default TickSlice.reducer;
